package com.ror.util;

import com.ror.domain.Poker;

//游戏资产工具类
public class AssetsUtil {
    //public static final String ASSETS_DIR = "assets/";
    public static final String ASSETS_DIR = "/Users/ror/Projects/CodeProjects/java-projs/poker-game/assets/";
    public static final String POKER_SUB_DIR = "poker/";
    public static final String IMAGE_SUFFIX = ".png";
    //地主图标文件路径
    public static final String LORD_ICON_PATH = ASSETS_DIR + "icon" + IMAGE_SUFFIX;
    //牌背贴图文件路径
    public static final String POKER_REAR_IMAGE_PATH = ASSETS_DIR + POKER_SUB_DIR + "rear" + IMAGE_SUFFIX;
    //扑克牌的贴图大小s
    public static final int POKER_IMAGE_WIDTH = 71;
    public static final int POKER_IMAGE_HEIGHT = 96;

    //获取扑克牌的贴图文件路径
    public static String assetPathOf(Poker poker) {
        return ASSETS_DIR + POKER_SUB_DIR +
                poker.getColor().assetCode + "-" + poker.numberAssetCode
                + IMAGE_SUFFIX;
    }
}
